﻿#ifndef NEWFORMULAWIDGET_H
#define NEWFORMULAWIDGET_H

#include <QDialog>
#include "productpicker.h"
#include "newformulastandarditemmodel.h"
#include "productservice.h"

namespace Ui {
class NewFormulaWidget;
}

class NewFormulaWidget : public QDialog
{
    Q_OBJECT

public:
    explicit NewFormulaWidget(QWidget *parent = nullptr);
    ~NewFormulaWidget();

    void showAndInit();

    void clear();

    void setSelectionRow();

private slots:
    void on_pushButtonCancel_clicked();

    void on_pushButtonReset_clicked();

    void on_pushButtonSubmit_clicked();

private:
    Ui::NewFormulaWidget *ui;
    NewFormulaStandardItemModel *model;

    ProductPicker productPicker;
    ProductService productService;

    Product *combineProduct;        //总成商品
};

#endif // NEWFORMULAWIDGET_H
